# $Id$
# Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Patrick Griffis <tingping@tingping.se>

pkgname=xdg-desktop-portal-gtk
pkgver=0.7
pkgrel=1
pkgdesc="A GTK+ backend for xdg-desktop-portal"
url="https://github.com/flatpak/xdg-desktop-portal-gtk"
arch=(i686 x86_64)
license=(LGPL2.1)
depends=(gtk3)
makedepends=(xdg-desktop-portal flatpak git)
provides=(xdg-desktop-portal-impl)
_commit=7df844d243ee0aa001d1c27304c0fc2e2fcbfc6f  # tags/0.7^0
source=("git+https://github.com/flatpak/xdg-desktop-portal-gtk#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --libexecdir=/usr/lib
  make 
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  DESTDIR="$pkgdir" make install
}
